package cn.dengta.webapp.trade.dao;

import java.util.List;

import cn.dengta.webapp.base.dao.BaseDao;
import cn.dengta.webapp.user.entity.UserWhiteAccount;
import org.apache.ibatis.annotations.*;

/**
 * ip白名单 Mapper 接口
 *
 * @author wxm
 * @since 2022/7/6 12:10
 */
public interface UserWhiteAccountDao extends BaseDao<UserWhiteAccount> {

	@Select("SELECT w.* FROM dt_user_white_account w LEFT JOIN dt_user u ON w.user_id = u.id WHERE w.type = 3 AND u.status > 0")
	List<UserWhiteAccount> selectOffLineAnchor();

	@Insert("INSERT INTO dt_user_recharge_limit_log (user_id, config_id, remark, add_time) VALUES (#{userId}, #{configId}, #{remark}, NOW())")
	void insertLimitLog(@Param("configId") Long configId, @Param("userId") Long userId, @Param("remark") String remark);

}
